{% extends 'page-builder-base.twig' %}
{% set bodyClasses = 'page-news news-list article-with-subnav  single' %}

{% block title %}
<title> {{ article.title }} | {{siteTitle}}</title>
{% endblock %}

{% block content %}
    <section>
         <div class="inner">
         {% block pageheading %}
             {% if page.metadata.heading %}
                 <h1>{{ page.metadata.heading }}</h1>
             {% endif %}
         {% endblock %}
         <a href="#subnav" class="nav-toggle">Menu</a>

        <ul id="subnav" class="nav subnav scroll-area tabs">
            {% set news = app.news.getLatest(9999) %} {# get last ten #}
            {% for a in news %}
                {% set active = a.id == article.id %}
            {% if a.videoCode %}
            <li class="has-video {% if active %}active{% endif  %}">
            <a href="{{ url('article', {articleTitle: a.slug} ) }}" title="Read full news article &rsaquo;">
                <span class="video">Video post</span>{{ a.title}}
            </a>
            </li>
            {% else %}
            <li class="{% if active %}active{% endif  %}"><a href="{{ path('article', {articleTitle: a.slug} ) }}" title="Read full news article &rsaquo;">{{ a.title }}</a></li>
            {% endif %}
            {% endfor %}
        </ul>


             <div class="content">
                 <div class="content-block paginated">
                     {% if article.title %}
                         <h2 class="title">{{article.title}}</h2>
                         <h3 class="date">{{article.date|date('d F y')}}</h3>
                     {% endif %}
                     {{ article.videoCode|raw }}
                     {{article.content|raw}}
                 </div>
             </div>

            {#

             <div class="content">
                 {%for contentBlock in page.contentBlocks %}
                     {% block contentBlock %}
                         <div id="id-{{contentBlock.id}}" class="content-block id-{{contentBlock.id}} paginated">
                             {% if contentBlock.title %}
                                 <h2 class="title">{{contentBlock.title}}</h2>
                                 <h3 class="date">{{contentBlock.date|date('d F y')}}</h3>
                             {% endif %}
                             {{contentBlock.content|raw}}
                         </div>
                     {% endblock%}
                 {% endfor%}
             </div>

             #}





        </div><!-- .inner -->
    </section>

{% endblock %}


